CallMeWhen
You schedule a callback event by calling theCallMeWhen
function. You can call this function from your callback function.
pascal OSErr CallMeWhen (QTCallBack cb, QTCallBackProc callBackProc, long refcon, long param1, long param2, long param3);
cb
- Specifies the callback event for the operation. You obtain this identifier from the
NewCallBack
function, which is described in the previous section.callBackProc
- Points to your callback function.
- Your callback function must have the following form:
pascal void MyCallBackProc (QTCallBack cb, long refcon);
- See "Callback Event Functions" on page 2-342 for details.
refcon
- Contains a reference constant value for your callback function.
param1
- Contains scheduling information. The Movie Toolbox interprets this parameter based on the value of the
cbType
parameter to theNewCallBack
function, described in the previous section.- If
cbType
is set tocallBackAtTime
, theparam1
parameter contains flags indicating when to invoke your callback function for this callback event. The following values are defined (be sure to set unused flags to 0):triggerTimeFwd
- Indicates that your callback function should be called at the time specified by
param2
only when time is moving forward (positive rate). The value of this flag is 0x0001.triggerTimeBwd
- Indicates that your callback function should be called at the time specified by
param2
only when time is moving backward (negative rate). The value of this flag is 0x0002.triggerTimeEither
- Indicates that your callback function should be called at the time specified by
param2
without regard to direction, but the rate must be nonzero. The value of this flag is 0x0003.- If the
cbType
parameter is set tocallBackAtRate
,param1
contains flags indicating when to invoke your callback function for this event. The following values are defined (be sure to set unused flags to 0):triggerRateChange
- Indicates that your callback function should be called whenever the rate changes. The value of this flag is 0x0000.
triggerRateLT
- Indicates that your callback function should be called when the rate changes to a value less than that specified by
param2
. The value of this flag is 0x0004.triggerRateGT
- Indicates that your callback function should be called when the rate changes to a value greater than that specified by
param2
. The value of this flag is 0x0008.triggerRateEqual
- Indicates that your callback function should be called when the rate changes to a value equal to that specified by
param2
. The value of this flag is 0x0010.triggerRateLTE
- Indicates that your callback function should be called when the rate changes to a value that is less than or equal to that specified by
param2
. The value of this flag is 0x0014.triggerRateGTE
- Indicates that your callback function should be called when the rate changes to a value that is less than or equal to that specified by
param2
. The value of this flag is 0x0018.triggerRateNotEqual
- Indicates that your callback function should be called when the rate changes to a value that is not equal to that specified by
param2
. The value of this flag is 0x001C.param2
- Contains scheduling information. The Movie Toolbox interprets this parameter based on the value of the
cbType
parameter to theNewCallBack
function, described in the previous section.- If
cbType
is set tocallBackAtTime
, theparam2
parameter contains the time value at which your callback function is to be invoked for this event. Theparam1
parameter contains flags affecting when the Movie Toolbox calls your function.- If
cbType
is set tocallBackAtRate
, theparam2
parameter contains the rate value at which your callback function is to be invoked for this event. Theparam1
parameter contains flags affecting when the Movie Toolbox calls your function.param3
- Contains the time scale in which to interpret the time value that is stored in
param3
ifcbType
is set tocallBackAtTime
.ERROR CODES
None